Outline definition apparatus and outline definition method, and image processing apparatus

ABSTRACT

An outline definition apparatus includes an edge detection unit detecting pixels at edge positions, each of the pixels at the edge positions having a data value between a value representing a first level and a value representing a second level, a pixel extraction unit extracting the pixels at the edge positions and extracting pixels in the vicinity thereof, a boundary-line generation unit generating a boundary line indicating a boundary between a region of the first level and a region of the second level in each of the pixels at the edge positions, and a link-processing unit obtaining an outline indicating a boundary between a region of the first level and a region of the second level in the still image by linking the boundary lines which are generated in the boundary-line generation unit and which are generated for the pixels which are located at the edge positions.

CROSS REFERENCES TO RELATED APPLICATIONS

The present invention contains subject matter related to Japanese PatentApplication JP 2006-146209 filed in the Japanese Patent Office on May26, 2006, the entire contents of which are incorporated herein byreference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to outline definition apparatuses used togenerate outlines which define boundary lines between first-levelregions and second-level regions and outline definition methods, andrelates to image processing apparatuses. More particularly, the presentinvention relates to an outline definition apparatus which defines anoutline not in units of pixels but with high precision by generatingboundary lines defining boundaries between first-level areas andsecond-level areas in pixels and linking the generated boundary lines.

2. Description of the Related Art

In general, in a field of image processing, a technique in whichpositions of edge of objects (hereinafter, referred to as “edgepositions”) in still images are detected has been used for variouspurposes. For example, Japanese Unexamined Patent ApplicationPublication No. 8-36641 discloses a method for coding image data with ahigh coding rate not by coding image data itself but by coding edge dataobtained by successively detecting edges of the image data. Furthermore,for example, Japanese Unexamined Patent Application Publication No.2004-79970 discloses a method for detecting edge positions (markpositions) from an image captured using a CCD (charge coupled device)camera when an overlapping state of circuit patterns is detected usingoverlapping marks in the course of fabrication. In the detection of theedge positions, for example, pixel portions having data valuessignificantly changed are detected.

SUMMARY OF THE INVENTION

In the methods for detecting edge positions disclosed in JapaneseUnexamined Patent Application Publication Nos. 8-36641 and 2004-79970,the edge positions are detected in units of pixels. However, if the edgepositions define an outline indicating boundary lines betweenblack-level regions and white-level regions, for example, whenenlargement processing of an image by incrementing the number of pixelsis performed, detection of edge positions in more precise units thanunits of pixels is desirable.

Accordingly, it is desirable to attain outline definition not in unitsof pixels but with high precision.

According to an embodiment of the present invention, there is providedan outline definition apparatus including an edge detection unitconfigured to detect pixels located at edge positions of a still image,each of the pixels located at the edge positions having a data valuebetween a value representing a first level and a value representing asecond level that is larger than the value representing the first level,a pixel extraction unit configured to extract the pixels located at theedge positions which are detected using the edge detection unit andextract pixels in the vicinity of the pixels located at the edgepositions, a boundary-line generation unit configured to generate, inaccordance with a data value of each of the pixels extracted using thepixel extraction unit, a boundary line indicating a boundary between aregion of the first level and a region of the second level in each ofthe pixels which are located at the edge positions and are detectedusing the edge detection unit, and a link-processing unit configured toobtain an outline indicating a boundary between a region of the firstlevel and a region of the second level in the still image by linking theboundary lines which are generated in the boundary-line generation unitand which are generated for the pixels which are located at the edgepositions and are detected using the edge detection unit.

Accordingly, the pixels located at the edge positions of a still image,each of the pixels located at the edge positions having a data valuebetween a value representing a first level (i.e., a black level) and avalue representing a second level (i.e., a white level), are detectedfrom pieces of data relating to the pixels included in the still image.The detection of the edge positions is performed in units of pixels.Furthermore, an outline indicating boundaries of first-level regions andsecond-level regions of the pixels at the edge positions is defined withhigh precision. Here, each of the “first level” and the “second level”is a certain level, that is, a level having a predetermined range.

Specifically, the pixels located at the edge positions and pixels in thevicinity thereof are extracted, and boundary lines indicating boundariesbetween the first-level regions and the second-level regions of thepixels are generated in accordance with the data values of the pixels.

In this case, for example, for each of the pixels located at the edgepositions, an angle of the boundary line in a pixel at an edge positionis determined in accordance with differences between a data value of thepixel located at the edge position and data values of pixels in thevicinity of the pixel located at the edge position. Furthermore,intercepts of the boundary line in which the angle thereof has beendetected are detected in accordance with a mixture ratio of the firstlevel and the second revel representing the data value of each of thepixels located at the edge positions. Here, the intercepts arecoordinates which are intersections of the boundary line and a pixelframe. The intercepts determine a position of the boundary line in eachof the pixels located at the edge positions.

Furthermore, the boundary lines generated in the pixels located at theedge positions are linked to one another, whereby an outline indicatinga boundary between a first-level region and a second-level region of astill image is obtained. For example, a direction of the boundary lineof each of the pixels located at the edge position is set such that apixel having a large data value is located on the left or right side,and a second boundary line to be connected to the first boundary line isset as a boundary line having a starting point nearest to an endingpoint of the first boundary line.

As described above, boundary lines indicating boundaries between thefirst-level regions and the second-level regions are generated in pixelswhich are located in the edge positions and which have data valuesbetween a value representing a black level and a value representing awhite level, in accordance with data values of the pixels located in theedge positions and data values of pixels in the vicinities of thecorresponding pixels. Thereafter, the boundary lines are linked to oneanother to generate an outline. The outline is defined not in units ofpixels but with high precision.

For example, still-image data constituted by the number of pixels largerthan that of original image data is generated using the outline definedas describe above. In this case, since the outline defines a boundary ofa black-level region and a white-level region of a still image with highprecision, the number of pixels which include the outline and thereforehave data values between a value representing a black level and a valuerepresenting a white level, which is increased when the image isenlarged, may be reduced in an outline portion. Accordingly, an enlargedimage having a clear outline may be obtained.

Accordingly, boundary lines indicating boundaries between thefirst-level regions and the second-level regions are generated in pixelswhich are located in the edge positions and which have data valuesbetween a value representing a black level and a value representing awhite level, in accordance with data values of the pixels located in theedge positions and data values of pixels in the vicinities of thecorresponding pixels. Thereafter, the boundary lines are linked to oneanother to generate an outline. The outline is defined not in units ofpixels but with high precision.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is shows a block diagram illustrating a configuration of an imageprocessing apparatus according to an embodiment of the presentinvention;

FIG. 2 shows a block diagram illustrating a function block of an outlinedefinition unit;

FIG. 3 shows a diagram illustrating a structure of a pixel;

FIGS. 4A to 4C show diagrams illustrating processing of detection ofboundary angles and boundary intercepts;

FIGS. 5A and 5B show diagrams illustrating link processing for boundarylines;

FIG. 6 shows a flowchart illustrating a processing procedure ofboundary-line definition processing;

FIG. 7 shows a flowchart illustrating a processing procedure ofboundary-line generation processing;

FIG. 8 shows a flowchart illustrating a processing procedure ofboundary-line link processing;

FIG. 9 shows a diagram illustrating a still image;

FIG. 10 shows an enlarged view of part of the still image and showspixels at edge positions;

FIG. 11 shows the relationship between a vector and a boundary lineangle;

FIG. 12 shows a boundary line generated in each of the pixels at theedge positions;

FIG. 13 shows a diagram illustrating a result of outline definition;

FIG. 14 shows a block diagram illustrating a function block of a datageneration unit;

FIGS. 15A to 15D show diagrams illustrating processing of datageneration unit;

FIGS. 16A and 16B are diagrams illustrating data values of pixels whenthe number of pixels are increased without defining an outline;

FIGS. 17A and 17B show examples of an image and an enlarged imagethereof when an outline is defined; and

FIGS. 18A and 18B show examples of an image and an enlarged imagethereof when an outline is not defined.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

Embodiments according to the present invention will be describedhereinafter with reference to the accompanying drawings. FIG. 1 shows aconfiguration of an image processing apparatus 100 according to anembodiment. The image processing apparatus 100 includes a CPU (centralprocessing unit) 101, a ROM (read-only memory) 102, a RAM (random accessmemory) 103, an image memory unit 104, a user-operation unit 105 such asan mouse or a keyboard, a scanner unit 106, a camera unit 107, a displayunit 108, and a printer unit 109, which are connected to one anotherthrough a bus 110.

The CPU 101 controls operation of the entire apparatus. The ROM 102stores programs necessary for operating the CPU 101 and data. The RAM103 functions as, for example, a working space for the CPU 101. Thescanner unit 106 and the camera unit 107 serve as input units used toinput still images represented by still-image data. The display unit 108and the printer unit 109 serve as output units used to output stillimages represented by still-image data. Note that, here, the still-imagedata is monochrome image data including a plurality of pieces of pixeldata. Each of the pieces of pixel data is eight-bit data having a valueranging from 0 to 255.

In the image processing apparatus 100 shown in FIG. 1, still-image dataobtained by the scanner unit 106 or the camera unit 107 is processed bythe CPU 101 in accordance with a user's operation using theuser-operation unit 105. The processed still-image data is supplied tothe display unit 108 or the printer unit 109 to be displayed as adisplay image or to be printed out as a printed image.

The CPU 101 performs processing on the still-image data to enlarge aregion of the still image represented by the still-image data. In thisimage-enlargement processing, the number of pixels included in an imageregion to be enlarged is increased in accordance with an enlargementfactor. For example, when the enlargement factor is 2, a half of theimage region is selected as a region to be enlarged and the number ofpixels included in the selected image region is increased to be twicethe original number of pixels of the selected image region.

The CPU 101 includes an outline definition unit and a data generationunit which are used for the image-enlargement processing. The outlinedefinition unit is used to obtain boundary lines between black-levelregions as first-level regions and white-level regions as second-levelregions on the basis of still-image data which has not yet beenprocessed and which is stored in the image memory unit 104. The datageneration unit is used to generate still-image data representing anenlarged image by increasing the number of pixels in the image region tobe enlarged in accordance with an outline defined by the outlinedefinition unit.

FIG. 2 shows a function block diagram of an outline definition unit 200.The outline definition unit 200 includes an edge detection unit 201, apixel extraction unit 202, a boundary-angle detection unit 203, aboundary-intercept detection unit 204, and a link-processing unit 205.The boundary-angle detection unit 203 and the boundary-interceptdetection unit 204 serve as a boundary-line generation unit.

The edge detection unit 201 detects pixels at edge positions having datavalues between a value representing a black level and a valuerepresenting a white level. Note that a data value representing theblack level is set to 0 and a data value representing the white level isset to 255. Pixels having data values of 1 to 254 are detected as pixelsat edge positions. The data value representing the black level and thedata value representing the white level may have predetermined rangessuch that a data value representing the black level ranges from 0 to 10and a data value representing the white level ranges from 245 to 255.

The pixel extraction unit 202 extracts pixels positioned at the edgepositions and in the vicinity thereof in accordance with the edgepositions detected by the edge detection unit 201. FIG. 3 shows a pixelstructure of a still image. Pixels are arranged in a matrix of N pixelsin the horizontal direction and M pixels in the vertical direction.

FIG. 4A shows an example of extracted pixels. In this case, a pixel d0located at an edge position, pixels d1 and d2 located adjacent to thepixel d0 in the vertical direction, and pixels d3 and d4 locatedadjacent to the pixel d0 in the horizontal direction are extracted.

The boundary-angle detection unit 203 detects an angle of a boundaryline defining a boundary between a black-level region and a white-levelregion in each of the pixels in accordance with differences between adata value of a pixel located at an edge position and data values ofpixels located in the vicinity thereof. In this case, as shown in FIG.4B, an angle of a boundary line (shown as a dotted line in FIG. 4B) isobtained by adding 90 degrees to an angle of a vector VC obtained from ahorizontal-direction component d2−d1 (=d2−d0+d0−d1) and avertical-direction component d4−d3 (=d4−d0+d0−d3).

The boundary-intercept detection unit 204 detects intercepts of aboundary line having the angle detected by the boundary-angle detectionunit 203, as shown in FIG. 4C, in accordance with a mixture ratio of theblack level to the white level representing the data value of each ofthe pixels located at the edge position. That is, the boundary-interceptdetection unit 204 detects coordinates (xs, ys) and (xe, ye) which areintersections of the boundary line and a pixel frame. In this case, anarea ratio of an area of a black-level region Sb in a square pixel andan area of a white-level region Sw in the square pixel corresponds tothe above-described mixture ratio of the black level to the white level.

As described above, a boundary line BL indicating a boundary between theblack-level region and the white-level region in the pixel are generatedfor each of the pixels at the edge positions. The boundary line BLrepresents a boundary between the black-level region and the white-levelregion in each of the pixels, each being located in one of the edgepositions. The direction of the boundary line BL is set so that a pixelhaving a high data value is located on one of the right side or the leftside, for example, in this embodiment, on the right side. In this case,as shown in FIG. 4C, the coordinate (xs, ys) is a starting point of theboundary line BL and the coordinate (xe, ye) is an ending point of theboundary line BL.

The link-processing unit 205 links boundary lines of pixels located atedge positions, which are generated by the above-described boundary-linegeneration unit (the boundary-angle detection unit 203 and theboundary-intercept detection unit 204), to one another, and obtains anoutline defining a boundary between a black-level region and awhite-level region in a still image. In this case, as shown in FIG. 5A,a second boundary line BL to be linked to a first boundary line BL isset as a boundary line having a starting point nearest to an endingpoint of the first boundary line BL.

In FIG. 5A, the ending point of the first boundary line BL and thestarting point of the second boundary line BL are linked to each other.However, coordinates of an ending point and a starting point do notcoincide with each other in most cases. Therefore, in this stage of thelink processing, as shown in FIG. 5B, each of the two boundary lines BLto be linked to each other are linked by a line BL′ at middle points ofthe boundary lines BL. The lines BL′ define an outline.

Operation of the outline definition unit 200 shown in FIG. 2 isdescribed with reference to flowcharts shown in FIGS. 6 to 8.

FIG. 6 shows a processing procedure of the outline definitionprocessing. The process starts in step ST1, and boundary lines BL aregenerated for pixels located at edge positions in step ST2. In step ST3,an outline is defined by linking the boundary lines BL generated in stepST2, and then the process terminates in step ST4.

FIG. 7 illustrates the processing procedure of the boundary-linegeneration processing performed in step ST2 of FIG. 6 in detail. Theprocess starts in step ST1, and the pixel d(0,0) on the left corner of ascreen (refer to FIG. 3) is set as a pixel of interest in step ST12. Instep ST13, it is determined whether the pixel of interest is located atan edge position. When a data value of the pixel of interest is in therange from more than 0 to less than 255, the pixel of interest isdetermined to be a pixel at an edge position.

An image of a character is shown as an example of a still image in FIG.9. FIG. 10 shows an enlarged view of part of the still image (indicatedby an arrow P) shown in FIG. 9, and numeric values given to pixels aredata values of the pixels. In this example, pixels having data values of65, 233, 29, 201, 2, 138, 63, 225, 12, and 144 are located at edgepositions.

When the pixel of interest is located at an edge position, an angle of aboundary line and intercepts of the boundary line are detected tothereby generate the boundary line of the pixel of interest. First, theangle of the boundary line is detected in accordance with differencesbetween a data value of the pixel of interest (a pixel located at anedge position) and data values of pixels located in the vicinity of thepixel of interest (refer to FIGS. 4A and 4B). For example, if a pixelhaving a data value of 138 indicated by an arrow Q shown in FIG. 10 is apixel of interest, the pixel having the data value of 138 is set aspixel d0, the pixel having the data value of 2 is set as pixel d1, thepixel having the data value of 255 is set as pixel d2, the pixel havingthe data value of 0 is set as pixel d3, and the pixel having the datavalue of 255 is set as pixel d4 in FIG. 4, and therefore, ahorizontal-direction component d2-d1 of a vector VC is 253 and avertical-direction component d4-d3 of the vector VC is 255. The boundaryline is angled at 45 degrees relative to the horizontal direction tolower right side as shown by an arrow R in FIG. 11.

Next, the intercepts of the boundary line (refer to FIG. 4C) aredetected in accordance with a mixture ratio of a black level to a whitelevel representing the data value of the pixel of interest (a pixellocated at an edge position). For example, if the pixel of interest hasa data value 138, 46% of the area of the pixel of interest isconstituted by a black-level region representing a data value of “0” and54% of the area of the pixel of interest is constituted by a white-levelregion representing a data value of “255” which are mixed with together.In view of this, interceptions are detected so that an area ratio of ablack-level region Sb to a white-level region Sw in a square pixel isset to 46:54.

After the process performed in step ST14, the process proceeds to stepST15. If the determination is negative in step ST13, the processdirectly proceeds to step ST15. In the step ST15, it is determinedwhether a next pixel exists in a raster order. Note that the rasterorder means an order of pixels from d(0,0), d(0,1), . . . , d(0, N-1),d(1,0), d(1,1), . . . , d(1, N-1), . . . , d(M-2, 0), d(M-2, 1), . . . ,d(M-2, N-1), d(M-1, 0), d(M-1, 1), . . . , to d(M-1, N-1) in the pixelstructure shown in FIG. 3.

When the determination is affirmative in step ST15, the next pixel isset as a pixel of interest in step ST16, and the process returns to stepST13 where a process the same as the process described above isperformed. On the other hand, when it is determined that the next pixeldoes not exist, the process proceeds to step ST17 where the process isterminated.

The boundary-line generation processing is performed as illustrated inthe flowchart of FIG. 7 whereby boundary lines BL for pixels located atedge positions are generated as shown in FIG. 12.

FIG. 8 shows a processing procedure of boundary-line link processingperformed in step ST3 of FIG. 6. The process starts in step ST21, andthe pixel d(0,0) located in the left corner of the screen is set as apixel of interest (refer to FIG. 3) in step ST22. In step ST23, it isdetermined whether the pixel of interest has a boundary line. When thedetermination is affirmative, the process proceeds to step ST24 where itis determined whether the boundary line has been used in previous linkprocessing. When the determination is negative, the process proceeds tostep ST25 where the pixel of interest is set as a link-processing pixelwhich should be subjected to link processing.

Then, in step ST26, it is determined whether a pixel in the vicinity ofthe link-processing pixel, for example, a pixel adjacent to thelink-processing pixel has a boundary line which is available to belinked. When the determination is affirmative, the process proceeds tostep ST27 where the boundary line of the link-processing pixel is linkedto a boundary line having a start point nearest to an end point of theboundary line of the link-processing pixel. Then, in step ST28, a “used”flag is set to the linked boundary line and the pixel having the linkedboundary line is set as a link-processing pixel and thereafter theprocess returns to step ST26 and the process described above isperformed from step ST26 onward.

In step ST26, when the determination is negative, the process proceedsto step ST29 where a result of a series of the link processing is storedas a shape, and thereafter the process proceeds to step ST30. When thedetermination is negative in step ST23 or when the determination isaffirmative in step ST24, the process directly proceeds to step ST30.

In step ST30, it is determined whether a next pixel exists in a rasterorder. When the determination is affirmative, the process proceeds tostep ST31 where the next pixel is set as a pixel of interest, andthereafter the process returns to step ST23 and the processed describedabove are performed from step ST23 onward. On the other hand, when thedetermination is negative in step ST30, the process proceeds to stepST32 where the process is terminated.

The boundary-line link processing is performed as illustrated in theflowchart of FIG. 8 whereby the boundary lines of the pixels at edgepositions are linked to one another. Accordingly, an outline indicatinga boundary of black-level and white-level regions of a still image aredefined with high precision. FIG. 13 shows a result of outlinedefinition processing for the still image shown in FIG. 9.

A description will now be made of a data generation unit used togenerate still image data representing an image enlarged using anoutline defined by the above-described outline definition unit. In thedata generation unit, it is assumed that 1/ER of the image area, whereER represents an enlargement factor, is to be enlarged. For example, ifthe enlargement factor ER is 2, ½ of the image area is to be enlarged.The data generation unit increases the number of pixels in an imageregion of an image to be enlarged to obtain ER times the number of thepixel of the image region whereby still image data representing anenlarged image is generated. The enlargement factors may beindependently set in the horizontal direction and the vertical directionof the image.

FIG. 14 shows a function block diagram of a data generation unit 300.The data generation unit 300 includes a pixel-number incrementation unit301 and a data-value determination unit 302. The pixel-numberincrementation unit 301 is used to increase the number of pixels in thehorizontal and vertical directions of the image region of the image tobe enlarged in accordance with an enlargement factor.

The data-value determination unit 302 determines data values of thepixels after the number of pixels has been increased, in accordance witha position of an outline defined by the outline definition unit. Thatis, a data value of a pixel in which an outline is not defined is set to“0” when the pixel is in a black-level region whereas a data value of apixel in which an outline is not defined is set to “255” when the pixelis in a white-level region. A data value of a pixel in which an outlineis defined is determined in accordance with an area ratio of ablack-level region to a white-level region of the pixel. In this case,as the area of the white-level region is increased, the data value isincreased.

A processing operation of the data generation unit will be describedwith reference to FIGS. 15A to 15D. FIG. 15A shows an example of pixelsbefore the number of pixels is increased. The outline definition unitdetermines that a pixel having a data value of 123 and a pixel having adata value of 185 are determined as pixels located at edge positions. Asshown in FIG. 15B, an outline indicating a boundary between ablack-level region having a data value of “0” and a white-level regionhaving a data value of “255” is generated in the pixel having a datavalue of 123 and the pixel having a data value of 185. In the datageneration unit, the number of pixels in the horizontal direction andthe number of pixels in the vertical direction are increased inaccordance with a set enlargement factor as shown in FIG. 15C. Then, asshown in FIG. 15D, data values for the pixels are determined inaccordance with a position of an outline.

According to the image processing apparatus 100 shown in FIG. 1, theoutline definition unit 200 including the CPU 101 (refer to FIG. 2)generates boundary lines BL indicating boundaries between black-levelregions and white-level regions in pixels which are located at edgepositions and which have data values between a value representing ablack level and a value representing a white level. The boundary linesBL are generated in accordance with data values of pixels located at theedge positions and the vicinities thereof (refer to FIG. 4). Then, thegenerated boundary lines are linked to one another to obtain an outline(refer to FIGS. 5A to 5D). Accordingly, the outline is generated not inunits of pixels but with high precision.

According to the image processing apparatus 100 shown in FIG. 1, thedata generation unit 300 including the CPU 101 (refer to FIG. 14) isused to increase the number of pixels in an image region to be enlargedby a set enlargement factor and to determine data values of pixels inaccordance with an outline defined using the outline definition unit 200(refer to FIG. 15). Since the outline defines a boundary of ablack-level region and a white-level region of a still image with highprecision, the number of pixels which include the outline and thereforehave data values between a value representing a black level and a valuerepresenting a white level, which is increased when the image isenlarged, may be reduced in an outline portion. Accordingly, an enlargedimage having a clear outline may be obtained.

For example, FIG. 16B shows data values of the pixels when the number ofpixels are increased without defining an outline shown in FIG. 15B butusing only pixels shown in FIG. 16A (which are the same pixels shown inFIG. 15A). The number of pixels having data values between more than “0”and less than “255” which define an outline is larger than that shown inFIG. 15D.

FIG. 17B is an enlarged image generated from an image shown in FIG. 17A(corresponding to FIGS. 15A and 16A) which is generated as still-imagedata and enlarged using an outline defined in advance. Therefore, theenlarged image has a clear outline. On the other hand, FIG. 18B is anenlarged image generated from the image shown in FIG. 18A (correspondingto FIGS. 15A and 16A) which is generated as still-image data andenlarged without defining an outline. Therefore, the enlarged image hasan unclear outline and is a blurred image.

In the foregoing embodiment, although an outline indicating a boundarybetween a black-level region and a white-level region of a still imageis obtained, the present invention is not limited to this. An outlineindicating a boundary between a first-level region and a second-levelregion which has a data value larger than that of the first-level regionmay be similarly obtained.

In the foregoing embodiment, although an outline is defined for theimage enlargement processing, the outline defined as described above maybe used in a scanning technique and other techniques.

It should be understood by those skilled in the art that variousmodifications, combinations, sub-combinations and alterations may occurdepending on design requirements and other factors insofar as they arewithin the scope of the appended claims or the equivalents thereof.

1. An outline definition apparatus comprising: an edge detection unitconfigured to detect pixels located at edge positions of a still image,each of the pixels located at the edge positions having a data valuebetween a value representing a first level and a value representing asecond level that is larger than the value representing the first level;a pixel extraction unit configured to extract the pixels located at theedge positions which are detected using the edge detection unit andextract pixels in the vicinity of the pixels located at the edgepositions; a boundary-line generation unit configured to generate, inaccordance with a data value of each of the pixels extracted using thepixel extraction unit, a boundary line indicating a boundary between aregion of the first level and a region of the second level in each ofthe pixels which are located at the edge positions and are detectedusing the edge detection unit; and a link-processing unit configured toobtain an outline indicating a boundary between a region of the firstlevel and a region of the second level in the still image by linking theboundary lines which are generated in the boundary-line generation unitand which are generated for the pixels which are located at the edgepositions and are detected using the edge detection unit.
 2. The outlinedefinition apparatus according to claim 1, wherein the boundary-linegeneration unit includes: a boundary-angle detection unit configured todetect an angle of the boundary line of each of the pixels in accordancewith, for each of the pixels located at the edge positions, differencesbetween a data value of each of the pixel located at the edge positionand data values of the pixels located in the vicinity of the pixellocated at the edge positions; a boundary-intercept detection unitconfigured to detect intercepts of the boundary line in each of thepixels located at the edge positions, which has an angle detected usingthe boundary-angle detection unit, in accordance with a mixture ratio ofthe first level to the second level representing the data value of eachof the pixel.
 3. The outline definition apparatus according to claim 1,wherein the link-processing unit, sets a direction of the boundary lineof each of the pixels located at the edge positions generated using theboundary-line generation unit so that a pixel having a large data valueis located on the left or right side, and determines that a secondboundary line which is to be linked to a first boundary line is aboundary line having a starting point nearest to an ending point of thefirst boundary line.
 4. An outline definition method comprising thesteps of: detecting pixels located at edge positions of a still image,each of the pixels located at the edge positions having a data valuebetween a value representing a first level and a value representing asecond level that is larger than the value representing the first level;extracting the detected pixels located at the edge positions andextracting pixels in the vicinity of the pixels located at the edgepositions; generating, in accordance with a data value of each of theextracted pixels, a boundary line indicating a boundary between a regionof the first level and a region of the second level in each of thepixels which are located at the edge positions and are detected; andobtaining an outline indicating a boundary between a region of the firstlevel and a region of the second level in the still image by linking theboundary lines which are generated for the detected pixels located atthe edge positions.
 5. An image processing apparatus comprising: a datainput unit configured to allow still-image data including a plurality ofpieces of image data to be input; an outline definition unit configuredto define an outline indicating an boundary between a region of a firstlevel and a region of a second level in a still image on the basis ofthe still image data input using the data input unit, the second levelbeing represented by a data value of pixels of the still image that islarger than a data value of pixels representing the first level; and adata generation unit configured to generate still image data for aregion of the still image to be enlarged by increasing the number ofpixels of the region to be enlarged in accordance with the outlinedefined in the outline definition unit, wherein the outline definitionunit includes an edge detection unit configured to detect pixels locatedat edge positions of an still image, each of the pixels located at theedge positions having a data value between a value representing a firstlevel and a value representing a second level that is larger than thevalue representing the first level, a pixel extraction unit configuredto extract the pixels located at the edge positions which are detectedusing the edge detection unit and extract pixels in the vicinity of thepixels located at the edge positions, a boundary-line generation unitconfigured to generate, in accordance with a data value of each of thepixels extracted using the pixel extraction unit, a boundary lineindicating a boundary between a region of the first level and a regionof the second level in each of the pixels which are located at the edgepositions and are detected using the edge detection unit, and alink-processing unit configured to obtain an outline indicating aboundary between a region of the first level and a region of the secondlevel in the still image by linking the boundary lines which aregenerated in the boundary-line generation unit and which are generatedfor the pixels which are located at the edge positions and are detectedusing the edge detection unit.